/**   
 * 文件名：MiniDuckSimulator.java   
 *   
 * 版本信息：   
 * date：2012-9-24   
 * Copyright 足下 Corporation 2012    
 * 版权所有   
 *   
 */
package org.codingbug.duck;

import org.codingbug.duck.Duck;
import org.codingbug.duck.fla.impl.FlyRocketPowered;
import org.codingbug.duck.impl.MallardDuck;
import org.codingbug.duck.impl.ModelDuck;

/**
 * 
 * @ClassName: MiniDuckSimulator 
 * @Description: TODO(Duck实现测试类) 
 * @author sam.zhang
 * @date 2012-10-3 上午2:05:27 
 *
 */
public class MiniDuckSimulator {

	public static void main(String[] args) {
		try {
			
			Duck mallard = new MallardDuck();
			mallard.display();
			mallard.performQuack();
			mallard.performFly();
			
			Duck model = new ModelDuck();
			model.display();
			model.performFly();
			model.setFlyBehavior(new FlyRocketPowered());
			model.performFly();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
